table of contents
other versions
- Tumbleweed 2026.11.13-1.1
- Leap-16.0
- Leap-15.6
| std::ranges::transform_view::iterator::operator[](3) | C++ Standard Libary | std::ranges::transform_view::iterator::operator[](3) |
NAME¶
std::ranges::transform_view::iterator::operator[] - std::ranges::transform_view::iterator::operator[]
Synopsis¶
constexpr decltype(auto) operator[]( difference_type n ) const (since C++20) requires ranges::random_access_range<Base>;
Returns the element at specified relative location, after transformation.
Effectively returns std::invoke(*parent_->fun_, current_[n]), where *parent_->fun_ is the transformation function stored in the parent transform_view, and current_ is the underlying iterator into V.
Parameters¶
n - position relative to current location.
Return value¶
the transformed element
Example¶
This section is incomplete
Reason: no example
| 2026.11.10 | http://cppreference.com |